<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>网站日志</title> 
    <link rel="shortcut icon" href="/favicon.ico"> 
    <link href="/public/admin/css/bootstrap.min.css?v=3.3.5" rel="stylesheet">
    <link href="/public/admin/css/font-awesome.css?v=4.4.0" rel="stylesheet">
    <link href="/public/admin/css/plugins/bootstrap-table/bootstrap-table.min.css" rel="stylesheet">
    <link href="/public/admin/css/animate.css" rel="stylesheet">
    <link href="/public/admin/css/style.css?v=4.0.0" rel="stylesheet">
    <link href="/public/admin/js/plugins/layer/skin/layer.css" rel="stylesheet">
    <base target="_blank">
    <!-- 全局js -->
    <script src="/public/admin/js/jquery.min.js?v=2.1.4"></script>
    <script src="/public/admin/js/bootstrap.min.js?v=3.3.5"></script>
    <script src="/public/admin/js/plugins/layer/layer.min.js"></script>
    <script src="/public/admin/plugins/laydate/laydate.js"></script>

    <!-- 自定义js -->
    <script src="/public/admin/js/content.js?v=1.0.0"></script>
    <script src="/public/admin/js/contabs.js"></script>
    <script src="/public/admin/js/common.js"></script>
    <script src="/public/admin/js/article.js"></script>
    <script src="/public/admin/js/myAjax.js"></script>

    <!-- Bootstrap table -->
    <script src="/public/admin/js/plugins/bootstrap-table/bootstrap-table.min.js"></script>
    <script src="/public/admin/js/plugins/bootstrap-table/bootstrap-table-mobile.min.js"></script>
    <script src="/public/admin/js/plugins/bootstrap-table/locale/bootstrap-table-zh-CN.min.js"></script>    
</head>

<body class="gray-bg">
<div class="wrapper wrapper-content animated fadeInRight">
    <div class="row">
        <div class="col-sm-12">
            <div class="ibox float-e-margins">
                <div class="ibox-title">
                    <h5>日志信息</h5>
                </div>
                <div class="ibox-content">
                    <div class="row">
                        <div class="col-xs-12">
                            <div class="box">
                                <div class="box-header">
                                    <div class="panel-body">
                                            <div>
                                            <form id="formSearch" class="form-horizontal form-inline">
                                                <label class="control-label">选择日期：</label>
                                                <input class="configInput form-control" name="start_time" type="text" onclick="laydate({istime: true, format: 'YYYY-MM-DD hh:mm:ss'})" required="" aria-required="true" value="2018-01-01 00:00:00">
                                                 到 
                                                <input class="configInput form-control" name="end_time" type="text" onclick="laydate({istime: true, format: 'YYYY-MM-DD hh:mm:ss'})" required="" aria-required="true" value="<?php echo date('Y-m-d H:i:s',time()) ?>">
                                                <button type="button" style="margin-left:30px" onclick="getAjaxList('ajaxList',1,'/index.php/Admin/System/ajax_log_list')" id="btn_query" class="btn btn-primary">查询</button>
                                                <a onclick="window.location.href=location.href;" href="javascript:;" class="btn btn-primary" style="margin-left:10px;"><i class="glyphicon glyphicon-refresh"></i>刷新</a>
                                            </form>
                                            </div>
                                    </div>                  
                                </div><!-- /.box-header -->
                                <div class="box-body">
                                    <div class="row">
                                        <div class="col-sm-12">
                                            <div id="ajaxList"></div>
                                        </div>
                                    </div>
                                </div> <!-- /.box-body -->
                           </div><!-- /.box -->
                        </div>
                   </div>
                </div>
            </div>
        </div>
    </div> 
</div>
<input id="handle_status" value="" hidden="hidden">
<script>
function delRecord(obj,name,id,url) {
    top.layer.confirm(name,{
        icon : 3,
        btn:['确定','取消'],
    } , function(){
        $.ajax({
            url : url,
            type : "post",
            data : {id:id,act:'del'},
            dataType : "json",
            success:function(data){
                if (data.status == 0) { 
                    top.layer.msg(data.message);
                } else {
                    top.layer.msg(data.message);
                    $(obj).parent().parent().remove();
                }
            }
        });
    } , function(){
        layer.close(); //再执行关闭 
    })
}
    getAjaxList('ajaxList',1,'/index.php/Admin/System/ajax_log_list');
    // $(document).ready(function(){
    //     ajax_get_table('formSearch',1);
    // });
    // ajax 抓取页面 form 为表单id  page 为当前第几页
    function ajax_get_table(form,url){
        // cur_page = page; //当前页面 保存为全局变量
        // var info = $('#page_info').val();
        $.ajax({
            type : "POST",
            url:url,
            data : $('#'+form).serialize(),// 你的formid
            success: function(data){
                $("#ajaxList").html('');
                $("#ajaxList").append(data);
            }
        });
        return false;
    }

    // function ajax_get_table(tab,page){
    //     cur_page = page; //当前页面 保存为全局变量
    //     $.ajax({
    //         type : "POST",
    //         url:"/index.php/Admin/Product/ajax_product_list/p/"+page,
    //         data : $('#'+tab).serialize(),
    //         success: function(data){
    //             $("#ajaxList").html('');
    //             $("#ajaxList").append(data);
    //         }
    //     });
    // }

</script>

</body>

</html>